package com.netrust.quarz.dao;


import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import com.netrust.quarz.entity.Server;


public interface ServerDao extends JpaRepository<Server, Integer>,JpaSpecificationExecutor<Server>{

	@Query(value="select s_object_id from t_server where s_carrier = ?1",nativeQuery=true)
	public List<Object> findServerObjectId(String carrier);
	
	@Query(value="from Server where isRunning = 1")
	public List<Server> findServersOnRunning();
	
	public List<Server> findByObjectIdIn(List<Integer> objIds);

	public List<Server> findByCarrier(String carrier);

}
